<template>
<div>
    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="C端入口">
            <el-form-item label="小程序">
                <el-switch v-model="merchant.miniAppsEntrance"></el-switch>
            </el-form-item>
            <el-form-item label="公众号">
                <el-switch v-model="merchant.h5Entrance"></el-switch>
            </el-form-item>
        </el-form-item>
    </el-form>

    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="选择车型模式">
            <el-form-item label="汽修宝式">
                <el-switch v-model="merchant.qixiubaoStyle" @change='setOther(merchant.qixiubaoStyle,"cascader")'></el-switch>
            </el-form-item>
            <el-form-item label="三级联动">
                <el-switch v-model="merchant.cascader" @change='setOther(merchant.cascader,"qixiubaoStyle")'></el-switch>
            </el-form-item>
        </el-form-item>
    </el-form>

    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="在线商城功能">
            <el-form-item label="购物车,订单">
                <el-switch v-model="merchant.basicMall" @change="setMall"></el-switch>
            </el-form-item>
            <el-form-item label="会员等级价">
                <el-switch v-model="merchant.seniorMall" :disabled="!merchant.basicMall"></el-switch>
            </el-form-item>
            <br>
            <el-form-item label="查看商品适配车型" label-width="140px" style="margin-left:-20px">
                <el-switch v-model="merchant.showModelRela"></el-switch>
            </el-form-item>
            <el-form-item label="零件号查询">
                <el-switch v-model="merchant.componentSearch"></el-switch>
            </el-form-item>
        </el-form-item>
    </el-form>

    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="会员管理功能">
            <el-form-item label="会员注册审核">
                <el-switch v-model="merchant.memberAudit"></el-switch>
            </el-form-item>
            <el-form-item label="禁止游客访问">
                <el-switch v-model="merchant.mustLogin"></el-switch>
            </el-form-item>
        </el-form-item>
    </el-form>

    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="VIN查询">
            <el-form-item label=" ">
                <el-switch v-model="merchant.vinSearch"></el-switch>
            </el-form-item>
            <el-form-item label="日查询量">
                <el-input v-model="merchant.vinNum" style='width:100px;' :disabled="!merchant.vinSearch"></el-input>
            </el-form-item>
        </el-form-item>
    </el-form>

    <el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="其他服务">
            <el-form-item label="维保上传">
                <el-switch v-model="merchant.maintenanceUpload"></el-switch>
            </el-form-item>
            <el-form-item label="在线客服">
                <el-switch v-model="merchant.onlineService"></el-switch>
            </el-form-item>
        </el-form-item>
    </el-form>
    <!--<el-form label-position="right" label-width="120px" size="mini" inline>
        <el-form-item label="是否开启力洋">
            <el-form-item label="是">
                <el-switch v-model="merchant.liyangDatasource"></el-switch>
            </el-form-item>
            
        </el-form-item>
    </el-form>-->

    <el-form label-position="right" label-width="120px" :inline="true" size="mini">
        <el-form-item label="服务到期时间">
            <el-date-picker v-model="merchant.endTime" type="date" placeholder="选择日期" :editable="false" style="width:160px"></el-date-picker>
        </el-form-item>
        <el-form-item label="缴费金额">
            <el-input v-model="renew.cost" style="width:100px"></el-input>
        </el-form-item>
    </el-form>
</div>
</template>

<script>
export default {
  name: 'functionPackageEditer',
  data(){
    return {
      
    }
  },
  methods:{
    setOther:function(value,other){
        if(value)this.merchant[other]=false;
    },
    setMall:function(value){
        if(!value)this.merchant.seniorMall=value;
    }
  },
  props:["merchant",'renew']
}
</script>

<style scoped>
.el-form{
    margin:-10px 0px
}
</style>
